package MVC.view.returnframe;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;

import javax.swing.JTree;
import javax.swing.tree.DefaultTreeCellRenderer;

import MVC.view.MyTreeNode;


class MyTreeCellRenderer extends DefaultTreeCellRenderer {
	 
	  public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel,boolean expanded, boolean leaf, int row, boolean hasFocus) {
		  super.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
		  MyTreeNode dmt = (MyTreeNode)value;
	    if (dmt.isHasError()) {
	        setForeground(Color.red);
	    }
	    return this;
	  }
	  
}